From 0d62579c66fdd322055d8a28778df51827e92c49 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 16 Apr 2008 17:23:08 +0000 Subject: [PATCH] Partically revert the last commit after realizing that 2008-04-16 Matthias Clasen Partically revert the last commit after realizing that xdg_mime_media_type_equal doesn't have to init at all. * xdgmime/xdgmime.h: * xdgmime/xdgmime.c: Get rid of _xdg_mime_media_type_equal * xdgmime/xdgmimecache.c: Use xdg_mime_media_type_equal svn path=/trunk/; revision=20011 --- gtk/xdgmime/ChangeLog | 10 ++++++++++ gtk/xdgmime/xdgmime.c | 13 ++----------- gtk/xdgmime/xdgmime.h | 2 -- gtk/xdgmime/xdgmimecache.c | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gtk/xdgmime/ChangeLog b/gtk/xdgmime/ChangeLog index d1c2775ac8..bd59c940c9 100644 --- a/gtk/xdgmime/ChangeLog +++ b/gtk/xdgmime/ChangeLog @@ -1,3 +1,13 @@ +2008-04-16 Matthias Clasen + + Partically revert the last commit after realizing that + xdg_mime_media_type_equal doesn't have to init at all. + + * xdgmime.h: + * xdgmime.c: Get rid of _xdg_mime_media_type_equal + + * xdgmimecache.c: Use xdg_mime_media_type_equal + 2008-04-16 Matthias Clasen Avoid possible memory corruption in xdgmime, fd.o bug 12512, diff --git a/gtk/xdgmime/xdgmime.c b/gtk/xdgmime/xdgmime.c index d344b586da..7ca7d6e431 100644 --- a/gtk/xdgmime/xdgmime.c +++ b/gtk/xdgmime/xdgmime.c @@ -670,8 +670,8 @@ xdg_mime_mime_type_equal (const char *mime_a, } int -_xdg_mime_media_type_equal (const char *mime_a, - const char *mime_b) +xdg_mime_media_type_equal (const char *mime_a, + const char *mime_b) { char *sep; @@ -683,15 +683,6 @@ _xdg_mime_media_type_equal (const char *mime_a, return 0; } -int -xdg_mime_media_type_equal (const char *mime_a, - const char *mime_b) -{ - xdg_mime_init (); - - return _xdg_mime_media_type_equal (mime_a, mime_b); -} - #if 1 static int xdg_mime_is_super_type (const char *mime) diff --git a/gtk/xdgmime/xdgmime.h b/gtk/xdgmime/xdgmime.h index d8172be25b..a4b0997293 100644 --- a/gtk/xdgmime/xdgmime.h +++ b/gtk/xdgmime/xdgmime.h @@ -99,8 +99,6 @@ void xdg_mime_remove_callback (int callback_id /* Private versions of functions that don't call xdg_mime_init () */ int _xdg_mime_mime_type_equal (const char *mime_a, const char *mime_b); -int _xdg_mime_media_type_equal (const char *mime_a, - const char *mime_b); int _xdg_mime_mime_type_subclass (const char *mime, const char *base); diff --git a/gtk/xdgmime/xdgmimecache.c b/gtk/xdgmime/xdgmimecache.c index e4773133d8..8717214fad 100644 --- a/gtk/xdgmime/xdgmimecache.c +++ b/gtk/xdgmime/xdgmimecache.c @@ -783,7 +783,7 @@ _xdg_mime_cache_mime_type_subclass (const char *mime, #if 1 /* Handle supertypes */ if (is_super_type (ubase) && - _xdg_mime_media_type_equal (umime, ubase)) + xdg_mime_media_type_equal (umime, ubase)) return 1; #endif -- 2.30.2